package com.fla.puzzle.ui.support;

import com.fla.puzzle.utils.BitmapUtils;
import com.nostra13.universalimageloader.core.display.BitmapDisplayer;

import android.graphics.Bitmap;
import android.widget.ImageView;

public class ReflectedDisplayer implements BitmapDisplayer {
    private final int outputDivider;

    public ReflectedDisplayer(int outputDivider) {
        this.outputDivider = outputDivider;
    }

    @Override
    public Bitmap display(Bitmap bitmap, ImageView imageView) {
        Bitmap createReflectedImage = BitmapUtils.createReflectedImage(imageView.getContext(), bitmap, outputDivider);
        imageView.setImageBitmap(createReflectedImage);
        return createReflectedImage;
    }
}
